{{define "upload"}}
<html>
  {{template "header"}}
  <body>
    This repository follows
    the <a href="http://marmalade-repo.org/doc-files/package.5.html">marmalade
    package format</a>.

    <form method="post" enctype="multipart/form-data" action="{{.}}">
      <input type="file" name="file" /><br/>
      <input type="submit" value="Upload" />
    </form>

    <h1>Single file format</h1>
    <div class="info">
      To upload a single .el file, make sure it follows standard emacs
      package forms. <code>M-x checkdoc</code> can help fix errors.

      Specifically, we look for the name and the description in the
      first line of the file, the author (not required), version
      (required) and required packages (not required), and the
      commentary (not required).

      The structure of these fields must be populated like in the
      following example:
      <code><pre>
;;; sample-test.el --- A sample package
;;
;; Copyright (c) 2013 Andrew Hyatt
;;
;; Author: Andrew Hyatt <ahyatt@gmail.com>
;; Homepage: http://ignore.for.now
;; URL: http://also.ignored
;; Version: 0.1.2.3
;; Last-Updated: 19 Aug 2012
;; Keywords: fee, fi, fo, fum
;; Package-Requires: ((req1 "1.0.0") (req2 "2.0.0") (req3 "3.0.0"))
;;
;; Simplified BSD License
;;
;;; Commentary:
;;
;; This is the package commentary,
;; which spans multiple lines.
;;
;;; Code:
;;; Etc...
      </pre></code>
    </div>
    <h1>Multiple file format</h1>
    <div class="info">
      To upload a multi-file package, upload the tar of the package
      (uncompressed).

      The tar must have one directory with the name of the file, a
      dash, and the version number.

      Inside the directory can be any number of files, but what there
      must be a file with the prefix being the package name and the
      suffix being <code>-pkg.el</code>.  This must have a single
      elisp expression of the form:
      <code>
      <pre>
(define-package package-name version [description]
            [dependency list])
      </pre>
      </code>
      The dependency list is a 2-element list of the package symbol and a
      version string. Example for something without dependencies:
      <code>
      <pre>
(define-package "go-mode" "20121127.1221" "Major mode for the Go programming language [source: hg]" 'nil)
      </pre>
      </code>
      An example for something with dependencies:
      <code>
        <pre>
          (define-package "helm-gist" "20120820.935" "helm-sources and some utilities for gist. [source: github]" (quote ((helm "20120811") (gist "1.0.1"))))
        </pre>
      </code>

      An example of a valid directory layout is:
      <pre>
        go-mode-20121127.1221/go-mode-load.el
        go-mode-20121127.1221/go-mode-pkg.el
        go-mode-20121127.1221/go-mode.el
      </pre>
      A README in the file will be used when displaying information to
      users looking at that package in emacs.
    </div>
  </body>
</html>
{{end}}
